﻿<?php ?>
<?php
	include('lib_db.php');
	
	//buoc 1 get input
	//co 1 tham so ten la q
	$id = isset($_GET['id']) ? $_GET['id'] * 1 : '';
	if ($id < 0) return 0;
	//echo $q;exit();
	//buoc 2 tao sql
	$sql = "select * from book ";
	$sql .= " where idBook = $id";
	//echo $sql;exit();
	//buoc 3 thuc thi
	$chi_tiet = select_list($sql);
	//print_r($datas);exit();
	//buoc 4 output
	

?>

		<div id ="wrapper">
			<div id ="header"><?php include("header.php");?></div><!--end header-->		
			<div id ="content">
				<div class="content-header"><?php include ("header-content.php")?></div> <!--end content-header-->
				
						<div class="clear-both"></div>			
				<div class="content-menu">
					<div class ="content-menu-left "><?php include ("content-menu-left.php")?></div>	<!--end content-menu-left -->					
					
					<!------ bắt đầu phần content-menu-center ----->
					<div class="content-menu-center">
						<div class="breadcrumb">
							<a title="trở về Trang chủ" href="/">Trang chủ</a>
							<span class="navigation-pipe">></span>
							<span class="navigation_end">
								<a href="http://vbook.vn/193-moi-ngay-1-cuon-sach"> Mỗi ngày 1 cuốn sách</a>
							</span>
							<span class="navigation-pipe">></span>
							<span class="navigation_product">Thôi Miên Bằng Ngôn Từ</span>
						</div><!-- end breadcrumb-->
						
					<?php if($chi_tiet) foreach ($chi_tiet as $data){?>
						
						
						<div id="primary_block" class="clearfix padT10">
							<div>
								<div id="pb-right-column">
									<div id="image-block">
										<img id="bigpic" alt="" title=" <?php echo $data['Name']?>" src="img1/<?php echo $data['ImgCover']?>">
									</div>
								</div>
								<div class="boxInfodetail">
									<form id="buy_block" method="post" action="/cart.php">
										<p class="hidden">
											<input type="hidden" value="64f9bae094ee0495eec5ddc984ea879b" name="token">
											<input id="product_page_product_id" type="hidden" value="31749" name="id_product">
											<input type="hidden" value="1" name="add">
											<input id="idCombination" type="hidden" value="" name="id_product_attribute">
										</p>
										<p>Tác giả:<span class="padB6 bold"><?php echo $data['Author']?></span></p>
										<p>Dịch giả:<span class="padB6 bold"><?php echo $data['Translator']?></span></p>
										<div class="padB6 bold"> NXB Thông tin và truyền thông </div>
										<div>Hình Thức Bìa:<?php echo $data['Paperboard']?></div>
										<div>Kích thước: <?php echo $data['Size']?> </div>
										<div>NXB: <?php echo $data['Publisher']?></div>
										<div>Số trang:<?php echo $data['PageNumber']?></div>
										<p>Trọng lượng:<span class="padB6 bold"><?php echo $data['Weight']?>gram</span></p>
										<p class="price"><span class="discount">Sách giảm giá</span>
											<span class="our_price_display"><span id="our_price_display"><?php echo $data['SalePrice']?>đ</span></span>
											<br>
										</p>
										<p id="old_price"><span class="bold"><span id="old_price_display">Giá bìa: <?php echo $data['CoverPrice']?>	đ</span></span></p>
										<p id="reduction_percent">(giá giảm<span id="reduction_percent_display"><?php echo $data['SaleOff']?></span>%)</p>
										<p id="add_to_cart" class="buttons_bottom_block">
											<input class="exclusive" type="submit" value="Đặt mua" name="Submit">
										</p>
									</form>
									
									<ul id="chiase">
										<li>
											<a class="addthis_button" href="http://addthis.com/bookmark.php?v=250&pub=xa-4ad610d45ea78ad4">
												Chia sẻ trên:
												<img border="0" alt="AddInto" src="img/share.png">
											</a>
										</li>
										<li>
											<a href="/modules/sendtoafriend/sendtoafriend-form.php?id_product=31749">Gửi tới bạn bè</a>
										</li>
									</ul>
									
								</div><!-- end boxInfodetail  -->
							</div>
						</div>
						
					<?php } ?>
					
				</div> <!--end content-menu-center-->
					<div class ="content-menu-right"><?php include ("content-menu-right.php")?></div> <!--end content-menu-right-->
								
			</div> <!--end content-menu-->
			
		</div> <!--end content-->
			<div id ="footer"><?php include("footer.php");?></div><!--end footer-->
			
		
		</div><!--end wapper-->
